package libra.init;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;


//标注配置类
@Configuration
//开启web配置
@EnableWebMvc
//开启事务配置
@EnableTransactionManagement
//指定包扫描
@ComponentScan("libra")
//读取properties文件
//@PropertySource(value={"classpath:db.properties"},encoding="UTF-8")
public class Config implements WebMvcConfigurer {
	//静态资源访问
	@Override
	public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) {
		configurer.enable();
	}
}
